package org.perche.chat.client;

import org.perche.chat.client.services.ChatServices;
import org.perche.chat.client.services.ChatServicesImpl;
import org.perche.chat.client.widgets.ChatHomePanel;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootLayoutPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Chat implements EntryPoint {
	

	/**
	 * Chat services
	 */
	private static ChatServices services = null;
	
	public static ChatServices getChatServices() {
		if (null == services) {
			services = new ChatServicesImpl();
		}
		return services;
	}

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {
		
		// Use RootPanel.get() to get the entire body element
		RootLayoutPanel.get().add(new ChatHomePanel());
		
	}
}
